#!/bin/bash
set -e

cd $(dirname $0)

pull()
{
    # Don't pull if we have the image locally
    if docker inspect $1 >/dev/null 2>&1; then
        return 0
    fi

    docker pull $1
}

pull ibuildthecloud/helloworld
pull cjellick/rancher-test-tools
pull ranchertest/volume-test:v0.1.0
pull tianon/true:latest
pull rancher/agent
pull mysql:$MYSQL_VERSION
pull postgres:$PGSQL_VERSION
for i in bootstrap.required.image; do
    pull $(grep $i ../modules/resources/src/main/resources/cattle-global.properties | cut -f2 -d=)
done
